package main

import "fmt"

type B struct {
	c int
	d string
	a int
}

type D struct {
	a int
	b string
	c B // 组合模式
}

func main() {
	d := D{10, "ooo", B{666, "ppp", 999}}
	fmt.Println(d)     // {10 ooo {666 ppp 999}}
	fmt.Println(d.c.d) // ppp
}
